/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.sun.dtv.ui;

import java.util.EventListener;

/**
 * The aim of a TextOverflowListener is to be notified if a text string won't fit into a component during an attempt to render it.
 * @author Rafael da Silva Almeida --- www.rafaelalmeida.net
 */
public interface TextOverflowListener extends EventListener {

    /**
     * This method is called by the SophisticatedTextLayoutManager if a text string won't fit into a component during an attempt to render it.
     * @param text - the string to be rendered
     * @param component - the ViewOnlyComponent into which the rendering attempt has taken place
     * @param overflowHorizontal - true if the text has overflowed horizontally; otherwise false
     * @param overflowVertical - true if the text has overflowed vertically; otherwise false
     */
    void notifyTextOverflow(String text, ViewOnlyComponent component, boolean overflowHorizontal, boolean overflowVertical);

}
